config_path=/home/ubuntu/code/mmdetection-master/result/mask-rcnn/20220310_090305.log.json
prefix=mask-rcnn
if [ -n "$1" ]
then
  config_path=$1
  echo $config_path
fi
if [ -n "$2" ]
then
  prefix=$2
fi
echo $config_path $prefix

python ./tools/analysis_tools/analyze_logs.py plot_curve ${config_path} --out ${prefix}-loss.jpg --keys loss_rpn_cls loss_rpn_bbox loss_cls loss_bbox loss_mask loss --legend loss_rpn_cls loss_rpn_bbox loss_cls loss_bbox loss_mask loss

python ./tools/analysis_tools/analyze_logs.py plot_curve ${config_path} --out ${prefix}-map.jpg --keys bbox_mAP bbox_mAP_50 bbox_mAP_75 segm_mAP segm_mAP_50 segm_mAP_75 --legend bbox_mAP bbox_mAP_50 bbox_mAP_75 segm_mAP segm_mAP_50 segm_mAP_75

python ./tools/analysis_tools/analyze_logs.py plot_curve ${config_path} --out ${prefix}-acc.jpg --keys acc --legend acc
# python ./tools/analysis_tools/analyze_logs.py plot_curve ${config_path} --out ${prefix}-map.jpg --keys acc --legend accuracy

